{{ header }}
<div class="site-breadcrumb">
	<div class="container">
		<ul class="breadcrumb">
			{% for breadcrumb in breadcrumbs %}
			<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
			{% endfor %}
		</ul>
	</div>
</div>
<div class="product-details product-form">
	<div class="container">
		{{ content_top }}
		<div class="row">
			<div class="col-md-5 col-sm-6">
				{% if thumb or images %}
				<div class="primary-images">
					{% if thumb %}
					<div class="image"><a href="{{ popup }}" title="{{ heading_title }}"><img src="{{ thumb }}" title="{{ heading_title }}" alt="{{ heading_title }}" /></a></div>
					{% endif %}
				</div>
				{% if images %}
				<div class="thumbnails clearfix">
					{% for image in images %}
					<div class="image"><a href="{{ image.popup }}" title="{{ heading_title }}"><img src="{{ image.thumb }}" title="{{ heading_title }}" alt="{{ heading_title }}" /></a></div>
					{% endfor %}
				</div>
				{% endif %}
				{% endif %}
			</div>
			<div class="col-md-7 col-sm-6">
				<div class="product-name">
					<h1>{{ heading_title }}</h1>
					{% if review_status %}
					<span class="review btn-show-review">{{ reviews }}</span>
					{% endif %}
				</div>
				{% if price %}
				<div class="price-box">
					{% if not special %}
					<span class="price">{{ price }}</span>
					{% else %}
					<span class="price">{{ special }}</span>
					<span class="compare-at-price">{{ price }}</span>
					{% endif %}
					{% if tax %}
					<span class="tax">{{ text_tax }}<span class="text">{{ tax }}</span></span>
					{% endif %}
					{% if points %}
					<span class="points">{{ text_points }}<span class="text">{{ points }}</span></span>
					{% endif %}
				</div>
				{% endif %}
				{% if discounts %}
				<hr/>
				<table class="table table-condensed discounts-table">
					<thead>
						<tr>
							<th>{{ text_muliple_discount_price }}</th>
							<th>{{ entry_qty }}</th>
							<th>{{ entry_unit_price }}</th>
							<th>{{ text_each_save }}</th>
						</tr>
					</thead>
					<tbody>
						{% for discount in discounts %}
						<tr>
							<th></th>
							<td>{{ discount.quantity }}</td>
							<td class="price">{{ discount.price }}</td>
							<td>{{ discount.save }}</td>
						</tr>
						{% endfor %}
					</tbody>
				</table>
				{% endif %}
				<div class="box-options">
					<ul class="list-unstyled">
						{% if manufacturer %}
						<li>{{ text_manufacturer }}<span class="text"><a href="{{ manufacturers }}">{{ manufacturer }}</a></span></li>
						{% endif %}
						<li>{{ text_model }}<span class="text">{{ model }}</span></li>
						{% if reward %}
						<li>{{ text_reward }}<span class="text">{{ reward }}</span></li>
						{% endif %}
						<li>{{ text_stock }}<span class="text">{{ stock }}</span></li>
					</ul>
				</div>
				<div class="variations product-variations">
					{% if options %}
					{% for option in options %}
					{% if option.type == 'select' %}
					<div class="form-group{% if option.required %} required {% endif %}">
						<label class="control-label" for="input-option{{ option.product_option_id }}">{{ option.name }}</label>
						<div class="control-content">
							<select name="option[{{ option.product_option_id }}]" id="input-option{{ option.product_option_id }}" class="form-control">
								<option value="">{{ text_select }}</option>
								{% for option_value in option.product_option_value %}
								<option value="{{ option_value.product_option_value_id }}">{{ option_value.name }}
								{% if option_value.price %}
								 {{ option_value.price_prefix }}{{ option_value.price }}
								{% endif %} </option>
								{% endfor %}
							</select>
						</div>
					</div>
					{% endif %}
					{% if option.type == 'radio' %}
					<div class="form-group{% if option.required %} required {% endif %}">
						<label class="control-label">{{ option.name }}</label>
						<div class="control-content">
							<div id="input-option{{ option.product_option_id }}">
								{% for option_value in option.product_option_value %}
								<div class="radio{% if option_value.image %} has-image{% endif %}">
									<label>
										<input type="radio" name="option[{{ option.product_option_id }}]" value="{{ option_value.product_option_value_id }}" />
										{% if option_value.image %} <img src="{{ option_value.image }}" alt="{{ option_value.name }} {% if option_value.price %} {{ option_value.price_prefix }} {{ option_value.price }} {% endif %}" /> {% endif %}
										{{ option_value.name }}
										{% if option_value.price %}
										<span class="additional">{{ option_value.price_prefix }}{{ option_value.price }}</span>
										{% endif %}
									</label>
								</div>
								{% endfor %}
							</div>
						</div>
					</div>
					{% endif %}
					{% if option.type == 'checkbox' %}
					<div class="form-group{% if option.required %} required {% endif %}">
						<label class="control-label">{{ option.name }}</label>
						<div class="control-content">
							<div id="input-option{{ option.product_option_id }}">
								{% for option_value in option.product_option_value %}
								<div class="checkbox">
									<label>
										<input type="checkbox" name="option[{{ option.product_option_id }}][]" value="{{ option_value.product_option_value_id }}" />
										{% if option_value.image %} <img src="{{ option_value.image }}" alt="{{ option_value.name }} {% if option_value.price %} {{ option_value.price_prefix }} {{ option_value.price }} {% endif %}" /> {% endif %}
										{{ option_value.name }}
										{% if option_value.price %}
										<span class="additional">{{ option_value.price_prefix }}{{ option_value.price }}</span>
										{% endif %}
									</label>
								</div>
								{% endfor %}
							</div>
						</div>
					</div>
					{% endif %}
					{% if option.type == 'text' %}
					<div class="form-group{% if option.required %} required {% endif %}">
						<label class="control-label" for="input-option{{ option.product_option_id }}">{{ option.name }}</label>
						<div class="control-content">
							<input type="text" name="option[{{ option.product_option_id }}]" value="{{ option.value }}" placeholder="{{ option.name }}" id="input-option{{ option.product_option_id }}" class="form-control" />
						</div>
					</div>
					{% endif %}
					{% if option.type == 'textarea' %}
					<div class="form-group{% if option.required %} required {% endif %}">
						<label class="control-label" for="input-option{{ option.product_option_id }}">{{ option.name }}</label>
						<div class="control-content">
							<textarea name="option[{{ option.product_option_id }}]" rows="5" placeholder="{{ option.name }}" id="input-option{{ option.product_option_id }}" class="form-control">{{ option.value }}</textarea>
						</div>
					</div>
					{% endif %}
					{% if option.type == 'file' %}
					<div class="form-group{% if option.required %} required {% endif %}">
						<label class="control-label">{{ option.name }}</label>
						<div class="control-content">
							<button type="button" id="button-upload{{ option.product_option_id }}" data-loading-text="{{ text_loading }}" class="btn btn-default btn-block"><i class="icon-upload"></i> {{ button_upload }}</button>
							<input type="hidden" name="option[{{ option.product_option_id }}]" value="" id="input-option{{ option.product_option_id }}" />
						</div>
					</div>
					{% endif %}
					{% if option.type == 'date' %}
					<div class="form-group{% if option.required %} required {% endif %}">
						<label class="control-label" for="input-option{{ option.product_option_id }}">{{ option.name }}</label>
						<div class="control-content">
							<div class="input-group date">
								<input type="text" name="option[{{ option.product_option_id }}]" value="{{ option.value }}" data-date-format="YYYY-MM-DD" id="input-option{{ option.product_option_id }}" class="form-control" />
								<span class="input-group-btn"><button class="btn btn-default" type="button"><i class="icon-calendar"></i></button></span>
							</div>
						</div>
					</div>
					{% endif %}
					{% if option.type == 'datetime' %}
					<div class="form-group{% if option.required %} required {% endif %}">
						<label class="control-label" for="input-option{{ option.product_option_id }}">{{ option.name }}</label>
						<div class="control-content">
							<div class="input-group datetime">
								<input type="text" name="option[{{ option.product_option_id }}]" value="{{ option.value }}" data-date-format="YYYY-MM-DD HH:mm" id="input-option{{ option.product_option_id }}" class="form-control" />
								<span class="input-group-btn">
									<button type="button" class="btn btn-default"><i class="icon-calendar"></i></button>
								</span>
							</div>
						</div>
					</div>
					{% endif %}
					{% if option.type == 'time' %}
					<div class="form-group{% if option.required %} required {% endif %}">
						<label class="control-label" for="input-option{{ option.product_option_id }}">{{ option.name }}</label>
						<div class="control-content">
							<div class="input-group time">
								<input type="text" name="option[{{ option.product_option_id }}]" value="{{ option.value }}" data-date-format="HH:mm" id="input-option{{ option.product_option_id }}" class="form-control" />
								<span class="input-group-btn">
									<button type="button" class="btn btn-default"><i class="icon-calendar"></i></button>
								</span>
							</div>
						</div>
					</div>
					{% endif %}
					{% endfor %}
					{% endif %}
					{% if recurrings %}
					<div class="form-group">
						<label class="control-label" for="input-option-recurring">{{ text_payment_recurring }}</label>
						<div class="control-content">
							<div id="input-option-recurring">
								{# <div class="radio">
									<label>
										<input type="radio" name="recurring_id" value="" />
										{{ text_not_recurring }}
									</label>
								</div> #}
								{% for recurring in recurrings %}
								<div class="radio{% if recurring.image %} has-image{% endif %}">
									<label>
										<input type="radio" name="recurring_id" value="{{ recurring.recurring_id }}" />
										{% if recurring.image %} <img src="{{ recurring.image }}" alt="{{ recurring.name }}" /> {% endif %}
										{{ recurring.name }}
									</label>
								</div>
								{% endfor %}
							</div>
							<div class="help-block" id="recurring-description"></div>
						</div>
					</div>
					{% endif %}
					<div class="form-group qty">
						<label class="control-label" for="input-quantity">{{ entry_qty }}</label>
						<div class="control-content">
							<div class="quantity-box">
								<input type="button" value="-" class="minus form-control" />
								<input type="text" name="quantity" value="{{ minimum }}" size="2" data-minimum="{{ minimum }}" class="quantity form-control" />
								<input type="button" value="+" class="plus form-control" />
							</div>
						</div>
					</div>
				</div>
				<input type="hidden" name="product_id" value="{{ product_id }}" />
				<input type="hidden" name="from" value="product-page" />
				<div class="product-btns">
					<button type="button" data-loading-text="{{ text_loading }}" class="btn btn-default btn-lg btn-buy-now">{{ button_buy_now }}</button><button type="button" data-loading-text="{{ text_loading }}" class="btn btn-primary btn-lg btn-add-to-cart">{{ button_cart }}</button><button type="button" data-toggle="tooltip" class="btn btn-default btn-icon btn-lg" title="{{ button_wishlist }}" onclick="wishlist.add('{{ product_id }}');"><i class="icon-heart"></i><span class="text">{{ button_wishlist }}</span></button><button type="button" data-toggle="tooltip" data-trigger="hover" class="btn btn-default btn-icon btn-lg" title="{{ button_compare }}" onclick="compare.add('{{ product_id }}');"><i class="icon-swap"></i><span class="text">{{ button_compare }}</span></button>
				</div>
				{% if minimum > 1 %}
				<div class="alert alert-info"><i class="icon-information"></i> {{ text_minimum }}</div>
				{% endif %}
			</div>
		</div>
	</div>
</div>
<div class="product-content">
	<div class="container">
		<div class="row">
			<div class="col-sm-12">
				<ul class="nav nav-tabs">
					<li class="active"><a href="#detail" data-toggle="tab"><span class="name">{{ tab_description }}</span></a></li>
					{% if attribute_groups %}<li><a href="#specs" data-toggle="tab"><span class="name">{{ tab_attribute }}</span></a></li>{% endif %}
					{% if review_status %}<li><a href="#review" data-toggle="tab"><span class="name">{{ tab_review }}</span><span class="badge">{{ review_count }}</span></a></li>{% endif %}
					{% if related_products %}<li><a href="#related" data-toggle="tab"><span class="name">{{ tab_related }}</span></a></li>{% endif %}
					{% if child_products %}<li><a href="#child" data-toggle="tab"><span class="name">{{ tab_child }}</span></a></li>{% endif %}
					{% if faq %}<li><a href="#faq" data-toggle="tab"><span class="name">{{ tab_faq }}</span></a></li>{% endif %}
				</ul>
				<div class="tab-content">
					<div class="tab-pane active" id="detail">
						{% if description %}
						{{ description }}
						{% else %}
						<p class="no-data-box"><i class="icon-information"></i><span class="text">{{ text_no_content }}</span></p>
						{% endif %}
						{% if tags %}
						<p>{{ text_tags }}
						{% for i in 0..tags|length %}
						{% if i < (tags|length - 1) %} <a href="{{ tags[i].href }}">{{ tags[i].tag }}</a>,
						{% else %} <a href="{{ tags[i].href }}">{{ tags[i].tag }}</a> {% endif %}
						{% endfor %}</p>
						{% endif %}
					</div>
					{% if attribute_groups %}
					<div class="tab-pane" id="specs">
						<table class="table table-bordered">
							{% for attribute_group in attribute_groups %}
							<thead>
								<tr>
									<td colspan="2"><strong>{{ attribute_group.name }}</strong></td>
								</tr>
							</thead>
							<tbody>
								{% for attribute in attribute_group.attribute %}
								<tr>
									<td>{{ attribute.name }}</td>
									<td>{{ attribute.text }}</td>
								</tr>
								{% endfor %}
							</tbody>
							{% endfor %}
						</table>
					</div>
					{% endif %}
					{% if review_status %}
					<div class="tab-pane" id="review">
						<div id="review-content">
							<p class="loading-box"><i class="icon-loading spin"></i><span class="text">{{ text_loading }}</span></p>
						</div>
						<form class="comment-form" id="review-form">
							<fieldset>
								<legend>{{ text_write }}</legend>
								{% if review_guest %}
								<div class="form-group required">
									<label class="control-label" for="input-name">{{ entry_name }}</label>
									<input type="text" name="name" value="{{ customer_name }}" id="input-name" class="form-control" />
								</div>
								<div class="form-group required">
									<label class="control-label" for="input-review">{{ entry_review }}</label>
									<textarea name="text" rows="5" id="input-review" class="form-control"></textarea>
								</div>
								<div class="form-group required">
									<label class="control-label">{{ entry_rating }}</label>
									<div class="radio">
										<label class="radio-inline"><input type="radio" name="rating" value="1" />{{ entry_bad }}</label>
										<label class="radio-inline"><input type="radio" name="rating" value="2" />{{ entry_not_bad }}</label>
										<label class="radio-inline"><input type="radio" name="rating" value="3" />{{ entry_good }}</label>
										<label class="radio-inline"><input type="radio" name="rating" value="4" />{{ entry_very_good }}</label>
										<label class="radio-inline"><input type="radio" name="rating" value="5" checked="checked" />{{ entry_great }}</label>
									</div>
								</div>
								{{ captcha }}
								<div class="buttons clearfix">
									<div class="pull-right">
										<button type="button" id="button-review" data-loading-text="{{ text_loading }}" class="btn btn-primary">{{ button_continue }}</button>
									</div>
								</div>
								{% else %}
								<p class="no-data-box">{{ text_login }}</p>
								{% endif %}
							</fieldset>
						</form>
					</div>
					{% endif %}
					{% if related_products %}
					<div class="tab-pane" id="related">
						<div class="product-list row">
							{% for product in related_products %}
							<div class="product-wrap col-lg-3 col-md-3 col-sm-6 col-xs-6">
								<div class="product-item">
									<div class="product-img">
										<div class="image">
											<a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-responsive" /></a>
										</div>
										<div class="action">
											<button type="button" data-toggle="tooltip" title="{{ button_cart }}" onclick="cart.add('{{ product.product_id }}', '{{ product.minimum }}');"><i class="icon-cart"></i></button>
											<button type="button" data-toggle="tooltip" title="{{ button_wishlist }}" onclick="wishlist.add('{{ product.product_id }}');"><i class="icon-heart"></i></button>
											<button type="button" data-toggle="tooltip" title="{{ button_compare }}" onclick="compare.add('{{ product.product_id }}');"><i class="icon-swap"></i></button>
										</div>
									</div>
									<div class="product-info">
										<h4 class="title"><a href="{{ product.href }}">{{ product.name }}</a></h4>
										{% if product.price %}
										<p class="price">
											{% if not product.special %}
											{{ product.price }}
											{% else %}
											<span class="price-new">{{ product.special }}</span>
											<span class="price-old">{{ product.price }}</span>
											{% endif %}
										</p>
										{% endif %}
									</div>
								</div>
							</div>
							{% endfor %}
						</div>
					</div>
					{% endif %}
					{% if child_products %}
					<div class="tab-pane" id="child">
						<div class="product-list row">
							{% for product in child_products %}
							<div class="product-wrap col-lg-3 col-md-3 col-sm-6 col-xs-6">
								<div class="product-item">
									<div class="product-img">
										<div class="image">
											<a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-responsive" /></a>
										</div>
										<div class="action">
											<button type="button" data-toggle="tooltip" title="{{ button_cart }}" onclick="cart.add('{{ product.product_id }}', '{{ product.minimum }}');"><i class="icon-cart"></i></button>
											<button type="button" data-toggle="tooltip" title="{{ button_wishlist }}" onclick="wishlist.add('{{ product.product_id }}');"><i class="icon-heart"></i></button>
											<button type="button" data-toggle="tooltip" title="{{ button_compare }}" onclick="compare.add('{{ product.product_id }}');"><i class="icon-swap"></i></button>
										</div>
									</div>
									<div class="product-info">
										<h4 class="title"><a href="{{ product.href }}">{{ product.name }}</a></h4>
										{% if product.price %}
										<p class="price">
											{% if not product.special %}
											{{ product.price }}
											{% else %}
											<span class="price-new">{{ product.special }}</span>
											<span class="price-old">{{ product.price }}</span>
											{% endif %}
										</p>
										{% endif %}
									</div>
								</div>
							</div>
							{% endfor %}
						</div>
					</div>
					{% endif %}
					{% if faq %}
					<div class="tab-pane" id="faq">
						{% if faq %}
						{{ faq }}
						{% else %}
						<p class="no-data-box"><i class="icon-information"></i><span class="text">{{ text_no_content }}</span></p>
						{% endif %}
					</div>
					{% endif %}
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript"><!--
$('input[name="recurring_id"], input[name="quantity"]').change(function(){
	$.ajax({
		url: 'index.php?route=product/product/getRecurringDescription',
		type: 'post',
		data: $('input[name=\'product_id\'], input[name=\'quantity\'], input[name=\'recurring_id\']:checked'),
		dataType: 'json',
		beforeSend: function() {
			$('#recurring-description').html('');
		},
		success: function(json) {
			$('.alert-dismissible, .text-danger').remove();

			if (json['success']) {
				$('#recurring-description').html(json['success']);
			}
		}
	});
});
//--></script>
<script type="text/javascript"><!--
$(document).on('click', '.btn-add-to-cart, .btn-buy-now', function() {
	var btn = $(this);
	var form = btn.parents('.product-form');
	$.ajax({
		url: 'index.php?route=checkout/cart/add',
		type: 'post',
		data: $('input[type=\'text\'], input[type=\'hidden\'], input[type=\'radio\']:checked, input[type=\'checkbox\']:checked, select, textarea', form),
		dataType: 'json',
		beforeSend: function() {
			btn.button('loading');
		},
		complete: function() {
			btn.button('reset');
		},
		success: function(json) {
			$('.alert-dismissible, .text-danger', form).remove();
			$('.form-group', form).removeClass('has-error');

			if (json['error']) {
				if (json['error']['message']) {
					$.notify({
						message: json['error']['message'] 
					},{
						offset: $(window).height()/2-60,
						placement: {
							from: 'top',
							align: 'center'
						},
						delay: 2000,
						allow_dismiss: false,
						type: 'notify large'
					});
				}

				if (json['error']['option']) {
					for (i in json['error']['option']) {
						var element = $('#input-option' + i.replace('_', '-'));

						element.parents('.form-group').addClass('has-error');
					}
				}

				if (json['error']['recurring']) {
					$('select[name=\'recurring_id\']', form).after('<div class="text-danger">' + json['error']['recurring'] + '</div>');
				}

			} else if (json['state'] == 'success' && json['message']) {
				if (btn.hasClass('btn-buy-now')) {
					location = json['checkout'];
				} else {
					swal({
						html: json['message'],
						type: json['state'],
						showCancelButton: true,
						cancelButtonText: $cnoc.button_confirm,
						confirmButtonText: $cnoc.button_checkout,
						onClose: function(){$('[data-toggle="tooltip"]:focus').tooltip('hide').focusout();}
					}).then(function(){
						location = json['checkout'];
					});

					$('.cart-quantity').html(json['cart_quantity']);

					$('.quick-cart-box').load('index.php?route=common/cart/info .quick-cart-wrapper');
				}
			}
		},
		error: function(xhr, ajaxOptions, thrownError) {
			alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
		}
	});
});
//--></script>
<script type="text/javascript"><!--
$('.variations .date').datetimepicker({
	language: '{{ datepicker }}',
	pickTime: false
});

$('.variations .datetime').datetimepicker({
	language: '{{ datepicker }}',
	pickDate: true,
	pickTime: true
});

$('.variations .time').datetimepicker({
	language: '{{ datepicker }}',
	pickDate: false
});

$('button[id^=\'button-upload\']').on('click', function() {
	var node = this;

	$('#form-upload').remove();

	$('body').prepend('<form enctype="multipart/form-data" id="form-upload" style="display: none;"><input type="file" name="file" /></form>');

	$('#form-upload input[name=\'file\']').trigger('click');

	if (typeof timer != 'undefined') {
		clearInterval(timer);
	}

	timer = setInterval(function() {
		if ($('#form-upload input[name=\'file\']').val() != '') {
			clearInterval(timer);

			$.ajax({
				url: 'index.php?route=tool/upload',
				type: 'post',
				dataType: 'json',
				data: new FormData($('#form-upload')[0]),
				cache: false,
				contentType: false,
				processData: false,
				beforeSend: function() {
					$(node).button('loading');
				},
				complete: function() {
					$(node).button('reset');
				},
				success: function(json) {
					$('.text-danger').remove();

					if (json['error']) {
						$(node).parent().find('input').after('<div class="text-danger">' + json['error'] + '</div>');
					}

					if (json['success']) {
						alert(json['success']);

						$(node).parent().find('input').val(json['code']);
					}
				},
				error: function(xhr, ajaxOptions, thrownError) {
					alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
				}
			});
		}
	}, 500);
});
//--></script>
<script type="text/javascript"><!--
$(document).on('click', '.btn-show-review', function() {
	$('a[href=\'#review\']').trigger('click');
	var scrollTop = $('.product-content .nav-tabs').offset().top - 10;
	$(window).scrollTop(scrollTop);
	return false;
});
$(document).on('click', '#review-content .pagination a', function(e) {
	e.preventDefault();

	$('#review-content').fadeOut('slow');

	$('#review-content').load(this.href);

	$('#review-content').fadeIn('slow');
});
$(document).on('click', 'a[href="#review"]', function() {
	if ($('#review-content .loading-box').length) {
		$('#review-content').load('index.php?route=product/product/review&product_id={{ product_id }}');
	}
});

$('#button-review').on('click', function() {
	$.ajax({
		url: 'index.php?route=product/product/write&product_id={{ product_id }}',
		type: 'post',
		dataType: 'json',
		data: $("#review-form").serialize(),
		beforeSend: function() {
			$('#button-review').button('loading');
		},
		complete: function() {
			$('#button-review').button('reset');
		},
		success: function(json) {
			$('.alert-dismissible').remove();

			if (json['error']) {
				$('#review-content').after('<div class="alert alert-danger alert-dismissible"><i class="icon-warning"></i> ' + json['error'] + '</div>');
			}

			if (json['message']) {
				$('#review-content').after('<div class="alert alert-success alert-dismissible"><i class="icon-checkmark"></i> ' + json['message'] + '</div>');

				$('input[name=\'name\']').val('');
				$('textarea[name=\'text\']').val('');
				$('input[name=\'rating\']:checked').prop('checked', false);
			}
		}
	});
});

$(document).ready(function() {
	$('.primary-images, .thumbnails').magnificPopup({
		type:'image',
		delegate: 'a',
		gallery: {
			enabled: true
		}
	});
});
//--></script>
{{ footer }}
